<div class="contacts view">
<h2><?php  echo __('Contact'); ?></h2>
	<dl>
		<dt><?php echo __('ID'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('First Name'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['first_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Middle Name'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['middle_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Last Name'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['last_name']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Position'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['position']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Email'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['email']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Mobile'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['mobile']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Home'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['home']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Office'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['office']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Address'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['address']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Notes'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['notes']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('List'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['list']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Created Date'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['created_date']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Modified Date'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['modified_date']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Department Of Contact'); ?></dt>
		<dd>
			<?php echo h($contact['Contact']['dept_of_cont']); ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>

                        		<li><?php echo $this->Html->link(__('Staff Users'), array('controller' => 'Users','action' => 'index')); ?></li>
                        		<li><?php echo $this->Html->link(__('Departments'), array('controller' => 'departments', 'action' => 'index')); ?> </li>
                        		<li><?php echo $this->Html->link(__('Contacts'), array('controller' => 'contacts', 'action' => 'index')); ?> </li>
                        		<li><?php echo $this->Html->link(__('Lists'), array('controller' => 'mail_lists', 'action' => 'index')); ?> </li>
                        		<li><?php echo $this->Html->link(__('Timesheets'), array('controller' => 'timesheets', 'action' => 'index')); ?> </li>
                        		<li><?php echo $this->Html->link(__('Notes'), array('controller' => 'notes', 'action' => 'index')); ?> </li>
                        	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Notes'); ?></h3>
	<?php if (!empty($contact['Note'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('ID'); ?></th>
		<th><?php echo __('Contact Id'); ?></th>
		<th><?php echo __('User Id'); ?></th>
		<th><?php echo __('Notes'); ?></th>
		<th><?php echo __('Date Time'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($contact['Note'] as $note): ?>
		<tr>
			<td><?php echo $note['id']; ?></td>
			<td><?php echo $note['contact_id']; ?></td>
			<td><?php echo $note['user_id']; ?></td>
			<td><?php echo $note['notes']; ?></td>
			<td><?php echo $note['date_time']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'notes', 'action' => 'view', $note['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'notes', 'action' => 'edit', $note['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'notes', 'action' => 'delete', $note['id']), null, __('Are you sure you want to delete # %s?', $note['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Note'), array('controller' => 'notes', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Users'); ?></h3>
	<?php if (!empty($contact['User'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('ID'); ?></th>
		<th><?php echo __('User ID'); ?></th>
		<th><?php echo __('Password'); ?></th>
		<th><?php echo __('Contact Name'); ?></th>
		<th><?php echo __('Permission'); ?></th>
		<th><?php echo __('Start Date'); ?></th>
		<th><?php echo __('End Date'); ?></th>
		<th><?php echo __('Dept1'); ?></th>
		<th><?php echo __('Dept2'); ?></th>
		<th><?php echo __('Dept3'); ?></th>
		<th><?php echo __('Cert Of Appre'); ?></th>

		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($contact['User'] as $user): ?>
		<tr>
			<td><?php echo $user['id']; ?></td>
			<td><?php echo $user['user_id']; ?></td>
			<td><?php echo $user['password']; ?></td>
			<td><?php echo $user['contact_id']; ?></td>
			<td><?php echo $user['permission']; ?></td>
			<td><?php echo $user['start_date']; ?></td>
			<td><?php echo $user['end_date']; ?></td>
			<td><?php echo $user['dept1']; ?></td>
			<td><?php echo $user['dept2']; ?></td>
			<td><?php echo $user['dept3']; ?></td>
			<td><?php echo $user['cert_of_appre']; ?></td>

			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'users', 'action' => 'view', $user['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'users', 'action' => 'edit', $user['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'users', 'action' => 'delete', $user['id']), null, __('Are you sure you want to delete # %s?', $user['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php echo __('Related Mail Lists'); ?></h3>
	<?php if (!empty($contact['MailList'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('ID'); ?></th>
		<th><?php echo __('Name'); ?></th>
		<th><?php echo __('Mail Desc'); ?></th>
		<th><?php echo __('Department ID'); ?></th>
		<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($contact['MailList'] as $mailList): ?>
		<tr>
			<td><?php echo $mailList['id']; ?></td>
			<td><?php echo $mailList['name']; ?></td>
			<td><?php echo $mailList['mail_desc']; ?></td>
			<td><?php echo $mailList['department_id']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'mail_lists', 'action' => 'view', $mailList['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'mail_lists', 'action' => 'edit', $mailList['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'mail_lists', 'action' => 'delete', $mailList['id']), null, __('Are you sure you want to delete # %s?', $mailList['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Mail List'), array('controller' => 'mail_lists', 'action' => 'add')); ?> </li>
		</ul>
	</div>
</div>
